import http from '../../utils/request/request'
const URL = '/file/type';

export function getAllInfo() {
    return http({
        url: `${URL}`,
        method: 'get'
    })
}

export function addInfo(name) {
    return http({
        url: `${URL}?name=${name}`,
        method: 'post',
    })
}


export function delInfoById(id) {
    
    return http({
        url: `${URL}/${id}`,
        method: 'delete'
    })
}

export function delInfoByIds(ids) {
    let url = URL + '/batch'
    return http({
        url,
        method: 'delete',
        data: ids
    })
}

export function editInfo(data) {
    return http({
        url: `${URL}`,
        method: 'put',
        data,
    })
}